﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QLDonHang.aspx.cs" Inherits="WebApplication1.Admin.QLDonHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="width:790px; padding:0px 5px 0 5px;">
<div class="ct_top">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"><h1>quản lý đơn hàng</h1></div>
</div> 
 <div class="ct_middle">
        <div style="padding:20px 0 20px 0;">
        <div>
        <table>
        <tr>
        <td>Tìm theo</td>
        <td>
            <asp:DropDownList ID="Ddltrangthai" runat="server">
                <asp:ListItem Value="0">[Trạng thái]</asp:ListItem>
                <asp:ListItem Value="1">Chưa liên lạc</asp:ListItem>
                <asp:ListItem Value="2">Chưa giao</asp:ListItem>
                <asp:ListItem Value="3">Đã giao</asp:ListItem>
            </asp:DropDownList>
        </td>
        <td style="width: 90px; text-align:right;">Từ ngày:<br />
        <td>
            <asp:DropDownList ID="ddltungay" runat="server">
            </asp:DropDownList>
        </td>
        <td style="width:90px;text-align:right;">Đến ngày:<br />
        <td>
            <asp:DropDownList ID="ddldenngay" runat="server">
            </asp:DropDownList>
        <td>
            <asp:Button ID="btntim" runat="server" Text="Tìm" onclick="btntim_Click" 
                Width="64px" /></td>
        </tr>
        <tr>
        <td colspan="7">
            <asp:Label ID="lbthongbao" runat="server" ForeColor="Red" Text=""></asp:Label>
        </td>
        </tr>
        </table>
        </div>
        
        
        
        
    <asp:GridView ID="GvDonHang" runat="server" AutoGenerateColumns="False" 
    CellPadding="4" Width="770px" onrowcommand="GvDonHang_RowCommand" 
        AllowPaging="True" AllowSorting="True" 
        onpageindexchanging="GvDonHang_PageIndexChanging" ForeColor="#333333" 
                GridLines="None">
        <RowStyle BackColor="#EFF3FB" />
        <Columns>
            <asp:BoundField HeaderText="Mã đơn hàng" DataField="Iddonhang"/>
            <asp:BoundField HeaderText="Mã khách hàng" DataField="Idnguoidung" />
            <asp:BoundField  HeaderText="Ngày đặt hàng" DataFormatString="{0:d}" HtmlEncode="false" DataField="Ngay" />
    
<%--            <asp:TemplateField HeaderText="CreationDate">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" 
                        Text='<%# Bind("Ngay", "{0:d}") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Ngay", "{0:d}") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>--%>
    
            <asp:BoundField HeaderText="Tổng tiền" DataFormatString="{0:F0}"  DataField="TongTien" />
            <asp:BoundField HeaderText="Trạng thái" DataField="TrangThai" />
            <asp:TemplateField HeaderText="Xem chi tiết" ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                        CommandName="chitiet" CommandArgument='<%#Eval("Iddonhang") %>' Text="Chi tiết"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <div style="padding:20px 0 0 0;">
    <table>
    <tr>
    <td></td>
    <td>Sắp xếp theo</td>
    <td>
        <asp:DropDownList ID="Ddlxapxep" runat="server">
            <asp:ListItem Selected="True" Value="1">Ngày đặt</asp:ListItem>
            <asp:ListItem Value="2">Tổng số tiền</asp:ListItem>
            <asp:ListItem Value="3">Trạng thái</asp:ListItem>
        </asp:DropDownList>

    </td>
    <td>        <asp:DropDownList ID="ddltanggiam" runat="server">
        <asp:ListItem Selected="True" Value="1">Tăng dần</asp:ListItem>
        <asp:ListItem Value="2">Giảm dần</asp:ListItem>
        </asp:DropDownList>
        </td>
        <td>
            <asp:Button ID="Btncapnhat" runat="server" Text="Cập nhật" 
                onclick="Btncapnhat_Click" /></td>
    </tr>

    </table>
    </div>
    </div>
     </div>
<div class="ct_bottom">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"></div>
</div>
 </div>
 
 
</asp:Content>
